package com.example.reactor;

import reactor.core.publisher.Flux;

public class Practice11 {

    public static void main(String[] args) {

        Flux.range(1, 100)
                .reduce(Integer::sum)
                .subscribe(System.out::println);

        System.out.println("---------------------------------------分割线-------------------------------------");


        Flux.range(1, 100)
                .reduceWith(() -> 100, Integer::sum)
                .subscribe(System.out::println);


    }
}
